<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学院开课列表</title>
</head>
<body>
	<div style="background-color:#fff;font-size:14px;">
		<input type="button" value="选 课"
			onclick="check_selected()" style="background-color:rgb(44,102,148);color:#fff">
		<input type="button" value="清除"
			onclick="clear_selected()" style="background-color:rgb(44,102,148);color:#fff">
		<div style="text-align: center;">
			<font color=#ff0000 size=4><span>开课列表</span></font>
		</div>
		<table border="1">
			<tr>
				<th style="width: 1%;text-align: center;">必修</th>
				<th style="width: 1%;text-align: center;">选修</th>
				<th style="width: 1%;text-align: center;">课程号</th>
				<th style="width: 8%;text-align: center;">课程名称</th>
				<th style="width: 8%;text-align: center;">主选班级</th>
				<th style="width: 8%;text-align: center;">主讲老师</th>
				<th style="width: 1%;text-align: center;">学分</th>
				<th style="width: 3%;text-align: center;">考核方式</th>
				<th style="width: 1%;text-align: center;">选课人数</th>
				<th style="width: 8%;text-align: center;">课时教室</th>
				<th style="width: 2%;text-align: center;">上课时间段</th>
				<th style="width: 2%;text-align: center;">学分类别</th>
				<th style="width: 14%;text-align: center;">备注</th>
			</tr>
			
			<tr>
				<td><input type="checkbox" name="checkbox" value="${course.id}+必"></td>
				<td><input type="checkbox" name="checkbox" value="${course.id}+选"></td>
				<td>${course.account}</td>
				<td><a href="course-description?courseID=${course.id}" target=_new>${course.name}</a></td>
				<td>${course.classIds}</td>
				<td>${course.teacherName}</td>
				<td>${course.credit}</td>
				
				<c:if test="${course.examine==0}">
					<td>期末考试为主型</td>
				</c:if>
				<c:if test="${course.examine==1}">
					<td>过程考核为主型</td>
				</c:if>
				
				<td><a href="course-number?courseID=${course.id}" target=_new><i class="fa fa-user"></i></a></td>
				<td>${course.addresses}</td>
				<td>${course.weeks}</td>
				
				<c:if test="${course.creditType=='0'}">
					<td>理科学分</td>
				</c:if>
				<c:if test="${course.creditType=='1'}">
					<td>文科学分</td>
				</c:if>
				<c:if test="${course.creditType=='2'}">
					<td>体育课</td>
				</c:if>
				<c:if test="${course.creditType=='3'}">
					<td>无</td>
				</c:if>
				
				<td>${course.remarks}</td>
			</tr>			
		</table>
		<p>深圳大学信息技术中心，2016年
	</div>
	
	<script src="dist/js/jquery-2.2.3.min.js"></script>
	<script src="dist/js/bootstrap.js"></script>
	<script type="text/javascript">
	function check_selected(){
		var str = "";
		$('input[name="checkbox"]:checked').each(function(){
			str += $(this).val()+"-";
		});
		alert(str);
	}
	
	function clear_selected() {
		$('input[name="checkbox"]:checked').each(function(){
			$(this).removeAttr("checked");
		});
	}
	</script>
</body>
</html>